package com.ymt.bpm.service.engine.bpd;

import com.alibaba.fastjson.JSONObject;
import com.ymt.bpm.model.PBpd;
import com.ymt.bpm.model.PBpdWithBLOBs;

/**
 * Created by Johnny on 2017/3/23.
 */
public interface BpdService {

    public JSONObject query(String tenantId,
                            String category,
                            String status,
                            String search,
                            String sort,
                            String order,
                            int offset,
                            int limit,
                            String lang,
                            int timezoneOffset);

    JSONObject get(String tenantId, String bpdId, String lang, int timezoneOffset);

    JSONObject save(String tenantId, String loginName, String displayName, PBpdWithBLOBs bpd);

    int saveModel(String tenantId, String loginName, String displayName, String bpd);

    JSONObject clone(String tenantId, String loginName, String displayName, PBpdWithBLOBs bpd);

    JSONObject invalidate(String tenantId, String loginName, String displayName, String bpdId);

    JSONObject delete(String tenantId, String loginName, String displayName, String bpdId);

    String checkName(String tenantId, String bpdId, String bpdName);
;
    JSONObject deploy(String tenantId, String loginName, String displayName, String bpdId);

    public JSONObject getVersions(String tenantId,
                            String bpdId,
                            String search,
                            String sort,
                            String order,
                            int offset,
                            int limit,
                            String lang,
                            int timezoneOffset);

    int getCurrentVersionId(String tenantId, String bpdId);
}
